import Landing from './components/layout/Landing'
import Login from './components/auth/Login'
import Register from './components/auth/Register'
import Dashboard from './components/dashboard/Dashboard'
import CreateProfile from './components/create-profile/CreateProfile'
import EditProfile from './components/edit-profile/EditProfile'
import AddEducation from './components/add-credentials/AddEducation'
import AddExperience from './components/add-credentials/AddExperience'
import Profiles from './components/profiles/Profiles'
import Profile from './components/profile/Profile'
import Posts from './components/posts/Posts'
// 鼓励留言
import Post from './components/post/Post'
let router = [
  {
    path: '/',//首页默认加载的页面
    componentName: Landing,
    exact: true, //是否为严格模式
  },
  {
    path: '/login',//后面是传递的参数id
    componentName: Login
  },
  {
    path: '/register',
    componentName: Register,
  },
  {
    path: '/dashboard',
    componentName: Dashboard,
    auth: true,//是否授权
    // routes: [  /** 嵌套路由  dashboard下面又有子页面*/
    //   {
    //     path: '/dashboard/',
    //     componentName: main,
    //     exact: false
    //   },
    // ]
  },
  {
    path: '/create-profile',
    componentName: CreateProfile,
    auth: true,//是否授权

  },
  {
    path: '/edit-profile',
    componentName: EditProfile,
    auth: true,//是否授权

  },
  {
    path: '/add-education',
    componentName: AddEducation,
    auth: true,//是否授权

  },
  {
    path: '/add-experience',
    componentName: AddExperience,
    auth: true,//是否授权
  },
  {//开发者
    path: '/profiles',
    componentName: Profiles,
    auth: false,//是否授权
  },
  {//开发者更多信息
    path: '/profile/:handle',//动态传参,
    componentName: Profile,
    auth: false,//是否授权
  },
  {//评论
    path: '/feed',
    componentName: Posts,
    auth: false,//是否授权
  },
    {//鼓励留言
      path: '/post/:id',
      componentName: Post,
      auth: true,//是否授权
    },
  


];

export default router;